package day6homework;


public class Point {
	private int x;
	private int y;
	public Point() {

	}
	public Point(int x, int y) {
		super();
		this.x = x;
		this.y = y;
	}

    public void MovePoint(int dx,int dy) {
    	x += dx;
    	y += dy;
    	System.out.println("改变后的坐标：(" + x + "," + y + ")");
    }
    
    @Override
	public String toString() {
		return "Point [x=" + x + ", y=" + y + "]";
	}
    
    
	public static void main(String[] args) {
    	Point point = new Point(2,4);
		point.MovePoint(4, 5);
		System.out.println(point);
	}
}

